#ifndef _EM36_H_
#define _EM36_H_


#define EM36_PUMP		0x01
#define EM36_VETEC		0x02
#define EM36_FAN		0x04
#define EM36_LAMBDA		0x08
#define EM36_MAINRELAY	0x10
#define EM36_ERROR		0x20
#define EM36_BAY		0x40
#define EM36_SHIFT		0x80

#define EM36_BATTERY_WARN	(EM36_battery < 115)			// 11.5v minimum
#define EM36_OILP_WARN		(EM36_oilP < (1 * 10))			// 1bar minimum

extern uint16_t EM36_engineSpeed;
extern uint8_t EM36_vehicleSpeed;
extern uint8_t EM36_fuelP;			// bar *10
extern uint8_t EM36_oilP;			// bar *10
extern uint8_t EM36_flags;
extern uint8_t EM36_throttle;		// 0:255 = 0:99.6%
extern uint8_t EM36_battery;		// battery in 100mV
extern uint8_t EM36_coolant;		// 0:215 degrees C
extern uint8_t EM36_T4Count;
extern uint8_t EM36_CAN_count;
extern uint16_t EM36_lambda;		// lambda * 1000


void EM36_init( void );
void EM36_status( void );
void EM36_task100ms(void);


#endif

